
//
//  GDFMomentDetiallUPTableViewCell.m
//  GlobalDeliciousFood
//
//  Created by 赵洁 on 16/1/11.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//

#import "GDFMomentDetiallUPTableViewCell.h"
#define kgap 10
@implementation GDFMomentDetiallUPTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _leftImage = [[UIImageView alloc]initWithFrame:CGRectMake(kgap, kgap, 60, 60)];
        _leftImage.layer.cornerRadius = 30;
        _leftImage.layer.masksToBounds = YES;
        _leftImage.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_leftImage];
        
        _nameLable = [[UILabel alloc]initWithFrame:CGRectMake(_leftImage.right+kgap, _leftImage.top, kScreenWidth - kgap*20, kgap *3)];
        _nameLable.numberOfLines = 0;
        _nameLable.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_nameLable];
        
        _descLable = [[UILabel alloc]initWithFrame:CGRectMake(_nameLable.left, _nameLable.bottom+kgap, kScreenWidth - kgap*8, _nameLable.height)];
        _descLable.numberOfLines  = 0;
        _descLable.font = [UIFont systemFontOfSize:13];
        _descLable.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_descLable];
        
        _timeLable = [[UILabel alloc]initWithFrame:CGRectMake(kScreenWidth -kgap*7, _nameLable.top, kScreenWidth-_nameLable.width-_leftImage.width, _nameLable.height)];
        _timeLable.numberOfLines = 0;
        _timeLable.font = [UIFont systemFontOfSize:13];
        _timeLable.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_timeLable];
        
    }
    return self;
}

- (void)setModel:(GDFMomentDetiallModle *)model
{
    _model = model;
    [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.header]];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
